You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* StoreKit2 support for Apple devices
* Add conditional building for win / android and make the build.sh changed as I have make the complier xcode
* Linux fix
* Clean up
* revert the to include the old way of header generator
* clean up build and path finding
* Fix tvOS build for Swift by directly compiling in target
* Add in dummy async func to force backward compatability
* [StoreKit2] Fix Xcode 15 dyld launch crashes on iOS <=16 and update documentation
This commit resolves several known compiler and runtime issues when compiling C++ alongside modern Swift (Concurrency) using Xcode 15+ for deployment on iOS 15/16:
1. `swift_task_alloc` (EXC_BAD_ACCESS): Mixing Swift Concurrency with `@objc` interfaces and C++ pointers on older runtimes causes memory segmentation faults. We introduced an Objective-C++ Block Barrier to keep C pointers on the C++ side (`analytics_ios.mm`) and used a detached `Task` with a pure Swift struct (`AppleTransactionVerifier.swift`) to safely isolate the async `Transaction.all` loop from the bridging boundary.
2. `AsyncIteratorProtocol` (Witness Table Corruption): Using a `for await` loop within an `@objc` class on iOS 15/16 triggers a known Xcode 15+ compiler bug leading to a runtime crash. We bypassed this by extracting the logic into a pure Swift struct and replacing the `for await` loop with manual `while let ... = await iterator.next()` iteration.
3. `__libcpp_verbose_abort`: Xcode 15 requires this symbol for C++ exception handling, but it is missing from the iOS 15/16 system `libc++`. We disabled verbose abort globally via `CMakeLists.txt` and provided a weak fallback implementation in `app_framework.cc` for integration tests to prevent a `dyld` launch crash.
4. `libswift_Concurrency.dylib`: The Swift compiler sometimes fails to weak-link the Concurrency backward compatibility library in Objective-C++ projects. We now natively inject `-Wl,-weak-lswift_Concurrency` into all integration test Xcode projects during `setup_integration_tests.py`.
Internal dialog comments have been cleaned up and replaced with professional explanations suitable for open-source maintainers.
Documentation in `release_build_files/readme.md` has been updated to provide clear instructions for manual C++ integrators to apply these linker/compiler flags if they experience similar crashes.
* simplify the build as we have xcode 16 as minimum and we only support ios 15+ which should bundle the concurrency headers
* Remove the old changes
* clean up pbxproj
* revert setup changes
* Continue the clean up
* Clean up some of the un needed changes
* More of the clean up
* Cleanup
* More clean up
* Comment why bitcode was removed
* Fix header inclusion after analytics order of operation change
* Verify readme and clean up tvos build
* Fix MSVC implicit include flags
* update readme
* Fix __libcpp_verbose_abort signature for Xcode 16
* fix formating
* Remove the FIREBASE_XCODE_TARGET_FORMAT STREQUAL "frameworks")
To test the log apple transaction function, you should use the existing test app and xcode's simulated transactions.
70
+
The manual test will involve running the integration test: `firebase_analytics_test/TestLogAppleTransaction` and verifying that it logs a transaction to the console.
71
+
72
+
- Step 1: Set up the Local Xcode Environment
73
+
- In Xcode, go to File > New > File from Template and create a StoreKit Configuration File (.storekit).
74
+
- Give the configuration any name.
75
+
- Target both integration_test and integration_test_tvos
76
+
- Add at least one dummy product to this file.
77
+
- Do this by selecting the file in xcode and clicking the + button in the bottom left corner.
78
+
- Choose a Non-Consumable in app purchase product.
79
+
- Give it a Reference name of your choice (e.g. "ReferenceAppleIapProduct").
80
+
- Give it a Product ID of your choice (e.g. "com.example.nonconsumable").
81
+
- Make the app use the store kit file. In the top bar go to Product > Scheme > Edit Scheme...
82
+
- In the left hand menu select Run
83
+
- Select the Options tab on the right
84
+
- Set the StoreKit Configuration dropdown to your new .storekit file.
85
+
- Step 2: Validate logging transactions
86
+
- Try running the test app with the dummy transaction ID. It should return an error from the
87
+
LogAppleTransactions function.
88
+
- After runnign the app once you can create a simulated transaction for testing.
89
+
- To create a simulated transaction ID:
90
+
- Go to Debug > StoreKit > Manage Transactions.
91
+
- Click the + button in the bottom left corner.
92
+
- Select the Non-Consumable in app purchase product.
93
+
- Copy the transaction ID to the test case and replace 'dummy_transaction_id' with your new transaction ID. e.g. '0'
94
+
- Make sure to update the testcase to now expect success.
95
+
- Then try running the test app again with the simulated transaction ID.
96
+
- It should log the transaction to the console. Both the Xcode console and firebase console should show a log for an in app purchase.
97
+
67
98
### Android
68
99
- Register your Android app with Firebase.
69
100
- Create a new app on the [Firebase console](https://firebase.google.com/console/), and attach
0 commit comments