I've just set up my public repository to build on Travis. It's an iOS library, that also makes use of CoreBlueooth's delegate methods. One of which looks like this:
- (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary<NSString *,id> *)advertisementData RSSI:(NSNumber *)RSSI
When it is included in the code to be built, it causes Travis to fail the build due to it expecting a '>' after NSDictionary<NSString * (assumingly because it doesn't like the pointer * sign inside an NSDictionary key definition). However, this is the delegate method for CBCentralManager, so is obviously syntacticly correct.
This compiles fine on my machine, and when the particular method implementation is commented out, everything runs fine (including other CoreBluetooth delegate methods). This looks like some kind of syntax issue, but compiles fine on my end?
Turns out Travis CI defaults OS X builds to use an old Xcode version (Xcode 6.1) - as suggested by @fullofsquirrels.
This causes issues with newer syntax, and in this case caused the build to fail. Updating the
.travis.ymlfile to specify the version to use fixed the issue, as follows:Hope this helps someone!