Skip to content

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

Description

@nirmal98kumar

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions