Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Replace UIActionSheet, UIAlertView with UIAlertController - #8373

Merged
1ec5 merged 1 commit into
release-ios-v3.5.0-android-v5.0.0from
1ec5-alert-controller-8371
Apr 2, 2017
Merged

1ec5 merged 1 commit into
release-ios-v3.5.0-android-v5.0.0from
1ec5-alert-controller-8371

Conversation

@1ec5

@1ec5 1ec5 commented Mar 13, 2017 •

Copy link
Copy Markdown
Contributor

Replaced UIActionSheet and UIAlertView with UIAlertController for the attribution sheet and telemetry opt-out alert, respectively. The sheet and alert look identical to how they did previously.

iPhone

iPad

This change is loosely based on #1497 (comment).

Fixes #8371.

/cc @incanus @frederoni

@1ec5 1ec5 added iOS Mapbox Maps SDK for iOS refactor labels Mar 13, 2017
@1ec5 1ec5 self-assigned this Mar 13, 2017
@1ec5
1ec5 requested a review from friedbunny March 13, 2017 10:25
@mention-bot

Copy link
Copy Markdown

@1ec5, thanks for your PR! By analyzing this pull request, we identified @incanus, @jfirebaugh and @boundsj to be potential reviewers.

@1ec5 1ec5 added this to the ios-v3.5.1 milestone Mar 13, 2017
@1ec5 1ec5 added the ⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold label Mar 13, 2017
@1ec5
1ec5 requested a review from frederoni March 18, 2017 22:50

@friedbunny friedbunny left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much appreciated. 🙇

[alertController addAction:declineAction];

UIAlertAction *participateAction = [UIAlertAction actionWithTitle:participateTitle
style:UIAlertActionStyleCancel

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😏

@1ec5
1ec5 force-pushed the 1ec5-alert-controller-8371 branch from 1155bc3 to cf21b24 Compare March 26, 2017 03:42
@1ec5
1ec5 force-pushed the 1ec5-alert-controller-8371 branch from cf21b24 to 3d3e534 Compare March 26, 2017 04:31
@1ec5 1ec5 removed the ⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold label Mar 26, 2017
@1ec5

1ec5 commented Mar 26, 2017

Copy link
Copy Markdown
Contributor Author

Android builds seem to be tripping over a template related to runtime styling:

[92/248] Building CXX object CMakeFiles/mbgl-core.dir/src/mbgl/style/style.cpp.o
FAILED: /opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++  --target=armv7-none-linux-androideabi --gcc-toolchain=/opt/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 --sysroot=/opt/android-ndk/platforms/android-9/arch-arm  -DMBGL_USE_GLES2=1 -DRAPIDJSON_HAS_STDSTRING=1 -DUCHAR_TYPE=char16_t -I../../../include -I../../../src -I../../../mason_packages/headers/geometry/0.9.0/include -I../../../mason_packages/headers/variant/1.1.4/include -I../../../mason_packages/headers/unique_resource/cba309e/include -I../../../mason_packages/headers/rapidjson/1.1.0/include -I../../../mason_packages/headers/boost/1.62.0/include -I../../../mason_packages/headers/geojson/0.4.0/include -I../../../mason_packages/headers/geojsonvt/6.2.0/include -I../../../mason_packages/headers/supercluster/0.2.0-1/include -I../../../mason_packages/headers/kdbush/0.1.1-1/include -I../../../mason_packages/headers/earcut/0.12.1/include -I../../../mason_packages/headers/protozero/1.4.2/include -I../../../mason_packages/headers/polylabel/1.0.2/include -I../../../platform/default -I../../../mason_packages/android-arm-v7-9/sqlite/3.14.2/include -I../../../mason_packages/android-arm-v7-9/nunicode/1.7.1/include -I../../../mason_packages/android-arm-v7-9/libzip/1.1.3/include -I../../../mason_packages/android-arm-v7-9/libzip/1.1.3/lib/libzip/include -I../../../mason_packages/headers/jni.hpp/3.0.0/include -I../../../mason_packages/android-arm-v7-9/icu/58.1-min-size/include -isystem /opt/android-ndk/sources/cxx-stl/llvm-libc++/include -isystem /opt/android-ndk/sources/android/support/include -isystem /opt/android-ndk/sources/cxx-stl/llvm-libc++abi/include -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -std=c++11 -frtti -fexceptions  -std=c++14 -ftemplate-depth=1024 -Wall -Wextra -Wshadow -Werror -Wno-variadic-macros -Wno-unknown-pragmas -O0 -fno-limit-debug-info    -DCI_BUILD=1 -fPIC -fvisibility-inlines-hidden -fvisibility=hidden -ffunction-sections -fdata-sections -std=gnu++14 -MD -MT CMakeFiles/mbgl-core.dir/src/mbgl/style/parser.cpp.o -MF CMakeFiles/mbgl-core.dir/src/mbgl/style/parser.cpp.o.d -o CMakeFiles/mbgl-core.dir/src/mbgl/style/parser.cpp.o -c /bitrise/src/src/mbgl/style/parser.cpp
In file included from /bitrise/src/src/mbgl/style/parser.cpp:6:
In file included from ../../../include/mbgl/style/conversion/layer.hpp:11:
In file included from ../../../include/mbgl/style/conversion/constant.hpp:6:
../../../include/mbgl/util/enum.hpp:22:32: error: instantiation of variable 'mbgl::Enum<mbgl::style::TranslateAnchorType>::begin' required here, but no definition is available [-Werror,-Wundefined-var-template]
        auto it = std::find_if(begin, end, [&] (const auto& v) { return s == v.second; });
                               ^
../../../include/mbgl/style/conversion/constant.hpp:61:38: note: in instantiation of member function 'mbgl::Enum<mbgl::style::TranslateAnchorType>::toEnum' requested here
        const auto result = Enum<T>::toEnum(*string);
                                     ^
../../../include/mbgl/style/conversion.hpp:90:12: note: in instantiation of function template specialization 'mbgl::style::conversion::Converter<mbgl::style::TranslateAnchorType, void>::operator()<rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::CrtAllocator> >' requested here
    return Converter<T>()(value, std::forward<Args>(args)...);
           ^
../../../include/mbgl/style/conversion/property_value.hpp:25:34: note: in instantiation of function template specialization 'mbgl::style::conversion::convert<mbgl::style::TranslateAnchorType, rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::CrtAllocator>>' requested here
            Result<T> constant = convert<T>(value);
                                 ^
../../../include/mbgl/style/conversion.hpp:90:12: note: in instantiation of function template specialization 'mbgl::style::conversion::Converter<mbgl::style::PropertyValue<mbgl::style::TranslateAnchorType>, void>::operator()<rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::CrtAllocator> >' requested here
    return Converter<T>()(value, std::forward<Args>(args)...);
           ^
../../../include/mbgl/style/conversion/property_setter.hpp:45:40: note: in instantiation of function template specialization 'mbgl::style::conversion::convert<mbgl::style::PropertyValue<mbgl::style::TranslateAnchorType>, rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::CrtAllocator>>' requested here
    Result<PropertyValue> typedValue = convert<PropertyValue>(value);
                                       ^
../../../include/mbgl/style/conversion/make_property_setters.hpp:89:40: note: in instantiation of function template specialization 'mbgl::style::conversion::setPaintProperty<rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::CrtAllocator>, mbgl::style::FillLayer, mbgl::style::PropertyValue<mbgl::style::TranslateAnchorType>, &mbgl::style::FillLayer::setFillTranslateAnchor>' requested here
    result["fill-translate-anchor"] = &setPaintProperty<V, FillLayer, PropertyValue<TranslateAnchorType>, &FillLayer::setFillTranslateAnchor>;
                                       ^
../../../include/mbgl/style/conversion/layer.hpp:52:20: note: in instantiation of function template specialization 'mbgl::style::conversion::setPaintProperty<rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::CrtAllocator> >' requested here
            return setPaintProperty(layer, k, v, klass);
                   ^
/bitrise/src/src/mbgl/style/parser.cpp:223:21: note: in instantiation of function template specialization 'mbgl::style::conversion::setPaintProperties<rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::CrtAllocator> >' requested here
        conversion::setPaintProperties(*layer, value);
                    ^
../../../include/mbgl/util/enum.hpp:27:25: note: forward declaration of template entity is here
    static const Value* begin;
                        ^
../../../include/mbgl/util/enum.hpp:22:32: note: add an explicit instantiation declaration to suppress this warning if 'mbgl::Enum<mbgl::style::TranslateAnchorType>::begin' is explicitly instantiated in another translation unit
        auto it = std::find_if(begin, end, [&] (const auto& v) { return s == v.second; });
                               ^
1 error generated.
ninja: build stopped: subcommand failed.
Makefile:588: recipe for target 'android-lib-arm-v7' failed
make: *** [android-lib-arm-v7] Error 1

@1ec5

1ec5 commented Mar 26, 2017

Copy link
Copy Markdown
Contributor Author

Tracking the Android build failure in #8528.

@1ec5
1ec5 force-pushed the 1ec5-alert-controller-8371 branch from 3d3e534 to 228bff7 Compare April 2, 2017 02:58
@1ec5
1ec5 merged commit 228bff7 into release-ios-v3.5.0-android-v5.0.0 Apr 2, 2017
@1ec5
1ec5 deleted the 1ec5-alert-controller-8371 branch April 2, 2017 03:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

iOS Mapbox Maps SDK for iOS refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants