Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Cannot build watchOS app with Flurry SDK on Xcode 14 beta #243

Open
9 tasks
gregggreg opened this issue Jul 10, 2022 · 10 comments
Open
9 tasks

Cannot build watchOS app with Flurry SDK on Xcode 14 beta #243

gregggreg opened this issue Jul 10, 2022 · 10 comments
Assignees
Labels

Comments

@gregggreg
Copy link

Describe the bug

When trying to include FlurryAnalytics (Flurry.xcframework) on my watchOS target in Xcode 14 beta 3, I get the following error when archiving for the device:

warning build: Ignoring file /Users/greg/Library/Developer/Xcode/DerivedData/Launcher-cbwwstpynjmoxcdqgxppdkctnphw/Build/Products/Debug-watchos/libFlurry.a, file is universal (armv7k,arm64_32) but does not contain the arm64 architecture: /Users/greg/Library/Developer/Xcode/DerivedData/Launcher-cbwwstpynjmoxcdqgxppdkctnphw/Build/Products/Debug-watchos/libFlurry.a
error build: Undefined symbol: OBJC_CLASS$_FlurryWatch

and building for the simulator I get this similar but different error on my M1 Mac:

warning build: Ignoring file /Users/greg/Library/Developer/Xcode/DerivedData/Launcher-cbwwstpynjmoxcdqgxppdkctnphw/Build/Products/Debug-watchsimulator/libFlurry.a, file is universal (i386,x86_64) but does not contain the arm64 architecture: /Users/greg/Library/Developer/Xcode/DerivedData/Launcher-cbwwstpynjmoxcdqgxppdkctnphw/Build/Products/Debug-watchsimulator/libFlurry.a
error build: Undefined symbol: OBJC_CLASS$_FlurryWatch

and the targets fail to build.

Looks like you need to add new arm64 slices for libFlurry.a on both watchOS and watchOS Simulator libraries for Xcode 14.

This Bug is About
Please choose the closest item by replacing [ ] with [x].

  • Integration
  • [ X ] Analytics
  • Ads
  • Messaging/Push
  • IAP
  • Remote Configuration
  • Flurry Website/Dashboard
  • Other

Platform
Please choose the platform(s) that you are having the issue by replacing [ ] with [x].

  • iOS
  • tvOS
  • [ X ] WatchOS

Environment
Please tell us the versions of Flurry SDK, XCode, and iOS you are using.

  • Flurry SDK: 12.0.1
  • XCode: 14 beta 3
  • watchOS: 9.0

To Reproduce
Steps to reproduce the behavior:
Add Flurry.xcframework to a watchOS app. Try to compile for simulator on M1 Mac or build for the watchOS device. Neither will compile.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Are you using Flurry Push/Messaging? No
(iOS) Are you using CocoaPods or manual binary integration? manual binary

Add any other context about the problem here.

@flurrydev
Copy link
Contributor

Hello @gregggreg

Are you building a standalone WatchOS app or a iOS app with a paired Watch extension?
Currently Flurry does not yet support a standalone WatchOS app.

I checked the Watch simulator binary and I do find a arm64 slice there for 12.0.1:
https://github.com/flurry/flurry-ios-sdk/blob/br_12.0.1/Flurry.xcframework/watchos-arm64_i386_x86_64-simulator/libFlurry.a

lipo -info libFlurry.a
Architectures in the fat file: libFlurry.a are: arm64 i386 x86_64

The WatchOS binary is built using the standard architectures (armv7k,arm64_32) but I will investigate further.

@gregggreg
Copy link
Author

Sorry, you're right, the simulator has the arm64 slice in 12.0.1. Somehow that wasn't installed properly.

I am creating a watch app paired with the iOS app. Starting in Xcode 14 is appears that "Standard Architectures" for watchOS apps are now "armv7k, arm64_32, and arm64" now.

Maybe that means there are new watches coming in the fall with arm64 processors? Or perhaps it's a bug in Xcode 14 that it is trying to build for the Mac's arch when building for watchOS instead of just the simulator?

Annoyingly it means that compiling with binary libraries like Flurry now breaks if you don't have the arm64 watchOS slice.

@LukasCZ
Copy link

LukasCZ commented Jul 22, 2022

I am also experiencing this problem. It would be great if you could add the arm64 slice even for real devices to fix this issue. Thank you.

@LukasCZ
Copy link

LukasCZ commented Aug 30, 2022

Any updates on this? With the public release of iOS 16 next week, I'd really love to see this fixed, so that I don't have to remove Flurry from my watchOS app. Thank you!

@gregggreg
Copy link
Author

Will be submitting tomorrow, so looks like I won't have watch analytics since this hasn't been fixed. Was looking forward to determining how many people actually use the watch app. Oh well.

@flurrydev
Copy link
Contributor

@gregggreg @LukasCZ

Attached is a release candidate for our next release. It adds arm64 support for WatchOS. My apologies for this delay.

You'll need to install it manually using similar syntax to the following:

pod 'Flurry-iOS-SDK', :path => '~/Downloads/Flurry-iOS-SDK.CocoapodsBuild.Release.12.1.3-rc1'

Flurry-iOS-SDK.CocoapodsBuild.Release.12.1.3-rc1.zip

@evgzor
Copy link

evgzor commented Sep 13, 2022

@flurrydev any plans for release 12.1.3 ? for file above I am getting [!] The platform of the target WatchOSExtension (watchOS 6.1) is not compatible with Flurry-iOS-SDK (12.1.3-rc1), which does not support watchOS.

@gregggreg
Copy link
Author

@flurrydev Thanks for this. I didn't receive this in time to put into my app for the release, but I am now testing it for the next release. When I uploaded the build I got a warning saying that my watch app now contained the non-public selector "mainScreen". Is there a way to eliminate this selector from the watch framework so that I don't have to run into any problems with App Review thinking I am calling non-public APIs? Thanks.

@LukasCZ
Copy link

LukasCZ commented Jan 2, 2023

@flurrydev is this fix also included in 12.1.4? When I install the 12.1.4 using CocoaPods, I go back to getting this error when trying to build:
Undefined symbol: _OBJC_CLASS_$_FlurryWatch

@mfclarke-cnx
Copy link

We're experiencing the same issue on the SPM version of the Flurry SDK: flurry/FlurrySwiftPackage#16

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants