Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest plugin version issue | Xcode compilation error for iOS build #171

Open
nirmal98kumar opened this issue Oct 30, 2024 · 7 comments
Open

Comments

@nirmal98kumar
Copy link

nirmal98kumar commented Oct 30, 2024

Your Environment

  • Plugin version: 7.2.4 (latest)
  • Platform: iOS / iPadOS
  • OS version: Any iOS version
  • Device manufacturer / model: Apple iPad / iPhone and Xcode Simulator
  • Cordova version (cordova -v): 10.0.0
  • Cordova platform version (cordova platform ls): ios 6.1.1
  • Device used to build app : Macbook Air
  • Xcode version : 13.2.1
  • Macbook OS version : Big Sur
  • Plugin config : ({ minimumFetchInterval: 15 }, onEvent, onTimeout)

Expected Behavior

  1. Xcode app build is succesful without errors
  2. ios .ipa file is created succesfully
  3. Can install app to connected ios device or over the air

Actual Behavior

  1. Xcode app build fails with error
  2. .ipa file not generated

Steps to Reproduce

In terminal following commands are run ,

  1. ionic cordova platform add [email protected]
  2. ionic cordova build ios

Now xcode workspce file is created , xcode is opened

  1. After selecting device to run , Build command is run

Context

When using the plugin for ios app build , Xcode build fails in the last compilation step with error as in logs

Code

 async backgroundFetch() {
    console.log('Background Fetch initialized');
    let onEvent = async (taskId) => {
      console.log('[BackgroundFetch] event received: ', taskId);
      await this.getBadgeCount()
      if (this.badgeCount >= 0) {
        console.log("Badge count", this.badgeCount)
        this.updateBadge.next(this.badgeCount)
      }
      BackgroundFetch.finish(taskId);
    };
    let onTimeout = async (taskId) => {
      console.log('[BackgroundFetch] TIMEOUT: ', taskId);
      BackgroundFetch.finish(taskId);
    };
    let status = await BackgroundFetch.configure({ minimumFetchInterval: 15 }, onEvent, onTimeout);
    console.log('[BackgroundFetch] configure, status: ', status);
    BackgroundFetch.start()
  }

Debug logs

//Xcode logs

Warning :

ld: warning: Could not find or use auto-linked framework 'Symbols'
Undefined symbols for architecture arm64:
"_objc_msgSend$removeObserver:", referenced from:
-[TSBackgroundFetch dealloc] in TSBackgroundFetch(TSBackgroundFetch.o)
"_objc_msgSend$finished", referenced from:
-[TSBackgroundFetch finish:] in TSBackgroundFetch(TSBackgroundFetch.o)
"_objc_msgSend$stop", referenced from:
-[TSBackgroundFetch stop:] in TSBackgroundFetch(TSBackgroundFetch.o)
"_objc_msgSend$setEnabled:", referenced from:
-[TSBackgroundFetch start:] in TSBackgroundFetch(TSBackgroundFetch.o)
"_objc_msgSend$count", referenced from:
-[TSBackgroundFetch removeListener:] in TSBackgroundFetch(TSBackgroundFetch.o)
-[TSBackgroundFetch finish:] in TSBackgroundFetch(TSBackgroundFetch.o)
"_objc_msgSend$setType:", referenced from:
-[TSBackgroundFetch

@nirmal98kumar
Copy link
Author

The issue doesn't happen with Plugin version: 7.2.1 , its the latest version that causes build to fail . So I'm pretty sure its an issue with new version only , so kindly check .

Also the error/warnings are in the very final stages of compilation step in Xcode

@nirmal98kumar nirmal98kumar changed the title Xcode compilation error for iOS build Latest plugin version issue | Xcode compilation error for iOS build Oct 30, 2024
@christocracy
Copy link
Member

What version XCode are you using?

@nirmal98kumar
Copy link
Author

What version XCode are you using?

Xcode version is 13.2.1

@christocracy
Copy link
Member

The plug-in was compiled with the latest XCode 16. You’re 3 versions behind.

upgrade your XCode.

@nirmal98kumar
Copy link
Author

Thanks for the info . However we can't upgrade xcode right now as it will introduce whole new set of issues when building app , so I guess we will stick to previous version of plugin for now

@christocracy
Copy link
Member

You’re using a version of XCode that is completely unaware of iOS 16 and above. The latest version of iOS is 18.

you cannot sit back on an old version of XCode.

@nirmal98kumar
Copy link
Author

nirmal98kumar commented Oct 30, 2024

I agree , its only a matter time of time before we upgrade XCode . The project was not maintained for 2 years and its taken for support now . Appreciate your feedback !

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

No branches or pull requests

2 participants