| #
9886c0aa |
| 28-Sep-2021 |
Kudo Chien <[email protected]> |
[expo-modules][ios] Fix errors from use_frameworks in Podfile (#14523)
# Why
close [ENG-1772](https://linear.app/expo/issue/ENG-1772/regression-test-for-use-frameworks-in-podfile)
fixes #13920
[expo-modules][ios] Fix errors from use_frameworks in Podfile (#14523)
# Why
close [ENG-1772](https://linear.app/expo/issue/ENG-1772/regression-test-for-use-frameworks-in-podfile)
fixes #13920
# How
- error: `The 'App' target has transitive dependencies that include static binaries`
declare `static_framework = true` in podspec. since all expo-modules ship in either source code or static xcframework, it should make sense to add `static_framework` declaration and solve this kind of errors.
- error: generated swift runtime header not found
fix like this because in framework mode, generated headers are inside module.
```diff
+#if __has_include(<ExpoModulesCore/ExpoModulesCore-Swift.h>)
+// For cocoapods framework, the generated swift header will be inside ExpoModulesCore module
+#import <ExpoModulesCore/ExpoModulesCore-Swift.h>
+#else
#import "ExpoModulesCore-Swift.h"
+#endif
```
- error: [gl] `<cassert>` import not found
this is supported in c++, thus rename to objc++ .mm files.
- error: [gl] `BLOCK_SAFE_RUN` inconsistent left/right operands types
this is side effect after renaming expo-gl files as .mm. fixed by explicitly cast as void.
- error: [core] undefined symbols in linking time, e.g. `EXRegisterModule`
this is side effect after renaming expo-gl files as .mm. fixed by export symbols by `extern "C"`, otherwise c++ will have different name mangling between c.
- rename `expo-image` pod to `EXImage`
- error: `Include of non-modular header inside framework module`
adding `DEFINES_MODULES` for cocoapods to create modulemap file. for external dependency like firebase, ignore the error by adding `CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES`
- error: expo-constant's app.config and expo-updates' app.manifest not found
in use_frameworks mode, the path is the same with non framework mode. `/$UNLOCALIZED_RESOURCES_FOLDER_PATH` is unnecessary.
- error: [barcode-scanner] ZXingObjC podspec GCC_PREPROCESSOR_DEFINITIONS does not export to EXBarCodeScanner and cause headers not found
add these defines explicitly
- [templates] add missing `react_native_post_install` from react-native 0.64 upgrade
- error: `Cycle inside FBReactNativeSpec; building could produce unreliable results. This usually can be resolved by moving the shell script phase '[CP-User] Generate Specs' so that it runs before the build phase that depends on its outputs.`
workaround by moving `FBReactNativeSpec` build phase script order.
Co-authored-by: Tomasz Sapeta <[email protected]>
# Test Plan
## prebuilt xcframework test
```sh
expo init -t /path/to/expo/templates/expo-template-bare-minimum sdk43
cd sdk43
# add `s.static_framework = true` for each `node_modules/expo-*/ios/*.podspec`
cd ios
# add `use_frameworks!` to Podfile
rm -rf Pods && pod install
cd ..
expo run:ios
expo run:ios --configuration Release
```
## regression for all expo-modules
```sh
expo init -t /path/to/expo/templates/expo-template-bare-minimum sdk43
cd sdk43
yarn add file:/path/to/expo/packages/expo-* # add all expo-modules one-by-one
# test non framework mode
expo run:ios
expo run:ios --configuration Release
# test framework mode
cd ios
# add `use_frameworks!` to Podfile
rm -rf Pods && pod install
cd ..
expo run:ios
expo run:ios --configuration Release
```
show more ...
|
| #
71ebd28e |
| 13-Sep-2021 |
Charlie Cruzan <[email protected]> |
[ios] Bump deployment target to 12.0 (#14383)
* drop ios 11
* update bare-sandbox
* forgot some
* add PR link to changelogs
* Update packages/expo-cellular/CHANGELOG.md
Co-authored-by
[ios] Bump deployment target to 12.0 (#14383)
* drop ios 11
* update bare-sandbox
* forgot some
* add PR link to changelogs
* Update packages/expo-cellular/CHANGELOG.md
Co-authored-by: Expo CI <[email protected]>
* et pod-install after rebase
Co-authored-by: Expo CI <[email protected]>
show more ...
|
| #
35f80476 |
| 25-Jun-2019 |
Sergei Chestakov <[email protected]> |
Expo In App Purchases (#4416)
* Generate unimodules template
* Get module and connectToAppStoreAsync function compiling and running
* Instatiate billing client and setup update listeners
*
Expo In App Purchases (#4416)
* Generate unimodules template
* Get module and connectToAppStoreAsync function compiling and running
* Instatiate billing client and setup update listeners
* Fix standalone ncl build on android
* Implement inventory querying for one-time and subscriptions
* Fix merge conflicts with yarn.lock
* Add repositories to build.gradle and generate gradle scripts
* Add .gitignore to package dir
* Add a method to query purchasable items
* Separate connecting to app store and querying purchases methods
Also returns values to the JS side. Connecting to app store will return
the history of purchases a user has made in the app. Querying for purchasables
returns all possible purchasable items available from the Google Play
Console. Both return a response code and array of results.
* Add method to initiate purchase flow and prompt user
* Add QueryResponse type for function return values
* Add disconnect from app store method and connection error type
* Add a method to get the Billing Response Code of the client
* Add method to acknowledge purchases thats required by Android billing
* Return a response when purchasing item
* Add consumeAsync method for consumable items
* Return response code in consumeAsync and check array before calling map
* Expose billing response code and purchase state constants
* Combine consuming and acknowledging a purchase in one function
Now a user can pass in a boolean which effectively dictates whether an
item is consumable or not (can be bought more than once) rather than
worry about calling two different functions
* index.ts -> InAppPurchases.ts && ExpoInAppPurchases.ts
* Add setPurchaseListener method for user to handle events
* Add Purchase and ItemDetails types
* Add method to query purchase history both via network or cache
* Move TS types to separate file
* Fix merge conflicts with pods/podfile
* Fix compilation errors with module template on iOS
* Add constants and boilerplate for connectToAppStore method
* Fix merge conflict in kernel-manifest
* Add queryPurchasableItems on iOS
* Modify xcode proj to permit distribution as expo payments (Revert before merge)
* Add method to purchase item and handle app store response
* Add disconnectAsync method on iOS and store/resolve promises in dictionary
* Return history in connectToAppStore and add purchase state constants
* Fix queryingPurchasableItems and format response properly to match Android
* Fix prematurely resolving promises when purchasing an item
* Use literals for dictionaries
* Reformat response to match Android and handle cancelled purchase
* Expose queryingPurchaseHistory on iOS
* Return constants using literal dictionaries
* Use a hashmap of promises in favor of event emitters on Android
* Remove references to listeners/subscriptions in TS
* Remove item type as parameter when querying purchasable items
On Android you typically have to pass in what the type of the item is
when you're querying for it (either inapp or subs) but this modifies
the TS api to just make both queries for the same list of items
* Make acknowledging purchase a no-op when not on Android
* Return objects as Bundles instead of JSON strings on Android
Avoids having to parse JSON strings on one platform
* Remove itemType param when queryingPurchaseHistory on Android
Query both types internally instead
* Fix calling purchaseItemAsync and handling user cancel/error on iOS
* Change the name of promise keys on iOS
* Return sub period on iOS and change how item type is determined
* Update packages/expo-in-app-purchases/android/src/main/AndroidManifest.xml
Co-Authored-By: Stanisław Chmiela <[email protected]>
* Add checks for null in Android module
* Fix spacing on iOS
* Reformat module constants and dictionary ret values
* Declare properties in the .m file
* Use array syntax intead of setValue forKey & enforce 1 promise per key
* Reject purchasing when a user cannot make payments
* Fix connect/disconnect obj c method declarations
* underscore_case -> camelCase for constants
* Simplify method names for clarity
connectToAppStoreAsync -> connectAsync
queryPurchasableItemsAsync -> getProductsAsync
getPurchaseHistoryAsync -> getPurchaseHistoryAsync
* Remove all references to Views/View Managers
* billingResponseCodes -> responseCodes
* Add spacing
* Change constant string declarations and add inapp/subs consts
* Remove View references from podfile
* Clean up getProductData method
Use format strings instead of mutable strings, break out getting unit into separate function, etc
* Remove unused props from package.json
* Update yarn.lock
* Reject purchase promise when user passes in invalid ID
* Check for method existance instead of platforms and store error message constants
* Standardize response across iOS and Android by converting to TS enum
This commit creates two new TS enums one for response codes and one for
error codes. ResponseCode can either be OK, USER_CANCELED, or ERROR. If
the code is ERROR, there will be a new attribute in the response
object called errorCode which contains more detail and corresponds to
the ErrorCode TS enum. This means we will no longer have to return those
constants and instead do the conversion natively and makes the iOS and
Android responses more consistent.
* Reject promise when a user tries to purchase item before querying
Prior to this, iOS would launch the purchase flow and Android would
resolve with a billing response code corresponding to "developer error".
This unifies the response on both platforms and mandates that a user
queries an item before attempting to purchase it
* Set connected flag after native method call
* Update error title to include module name
* Reject duplicate promises for purchasing or acknowledging
* Reject purchase query promise if billing client is null
* Aggregate product info for inapp/subs on Android natively
* Aggregate purchase history for inapp/subs on Android natively
* Implement restoreCompletedTransactionsFailed on iOS
* Remove exported constants
* Switch to emitting purchases and using listener to handle them
* Return a boolean in setPromise to prevent further execution on rejection
* Implement finishTransactionAsync on iOS
Also renames the top level TS method from acknowledgePurchaseAsync to
finishTransactionAsync. Additionally, the function is available on both
platforms and the boolean for consuming is passed down for Android to
handle natively.
* Rename purchases updated event
* Handle deferred transactions on iOS
* Remove logs
* Split productRequest into two methods on iOS
This handles the item queries and purchases separately and makes the
logic easier to follow
* Add pragma marks and reorganize iOS code
* Add ejected Expo app to test payments
* Revert changes to android, ios, template-files, and apps directories
Checkout latest changes from master
* Remove unnecessary return statement
* Checkout yarn.lock from master and update
* Remove gradlew scripts and settings.gradle
* Fix expo-payments compilation on Android
By default ejected Expo apps look for scripts and dependencies in node_modules of the project repo. However, since this is in a yarn workspace, many of the paths have to be changed to point to node_modules in the root of the expo repo
* Update expo-payments for clarity
* Update yarn.lock
* Get yarn.lock from master
* Run yarn
* [android] update jsc version to 241213.2.0
* Revert "[android] update jsc version to 241213.2.0"
This reverts commit ccf94cd4850955e87f7d21becebd2b93fd6d21bc.
* Revert diffs in android directory
* Revert diffs in ios and template-files directories
* mEventEmitter -> sEventEmitter on Android and remove diffed whitespace
* Add regenerator-runtime to dependencies
* Pass in acknowledged boolean to getTransactionData to indicate completed purchase
* Add original transaction info on iOS
* Revert changes in iOS directory
* onPurchase -> setPurchaseListener
* Rename iOS constants with kEX prefix
* Change purchaseToken to orderId on iOS
Also update finishTransaction signature/implementation, TS Purchase type, and demo app
* Remove expo-payments app from this PR
* Revert changes to standalone-ncl
* Remove diffs in the ios/ directory
* Update package README
* Return from finishTransaction if purchase is acknowledged
* Pass in unused param and ignore natively on iOS
* Add TS enum for PurchaseState and convert natively on Android
* Return default sub period rather than empty string on Android
This matches the iOS implementation. Also add small semantic changes
such as method names
* Dont remove subscription in disconnectAsync
* Delete unused view build files
* ModuleRegistryConsumer -> RegistryLifecycleListener
* Run yarn
* Run gulp update-exponent-view
* Make event emitter private
* Reformat Android project to use 2 spaces
* Add IAP prefix to TS enums
* Revert expokit-npm-package changes
* Resolve conflicts in yarn.lock
* Remove expokit-npm-package changes
* Get yarn.lock from master
* Update yarn.lock
* expokit-npm package from master
* Revert "expokit-npm package from master"
This reverts commit f8dbb4a35ed73e9eaae90b431303cef0734d681c.
* Revert "Remove expokit-npm-package changes"
This reverts commit 8464ccf4f62dd00afac38325a342e3cbe505c0c7.
* Revert "Revert expokit-npm-package changes"
This reverts commit 272f9ce27b610f1491a7b2af695c7b6831b91659.
* Revert "Run gulp update-exponent-view"
This reverts commit f9c86235146261696f40938ec904c7c7b934b04b.
* Remove changes in unimodules core
* Update jsc-android
* Create TS enum for item type and convert natively
* Change IAPItemType values
show more ...
|