Xcode 10.2 with Swift 5.0 compiler - protocol inheritance issue
You may be running into https://bugs.swift.org/browse/SR-10257 in the Swift 5.0 compiler. This would happen if you have at least three files:
BasicViewController.swift
SomeOtherFile.swift
ExampleViewController.swift
If SomeOtherFile.swift
makes any calls to an AnyObject
-typed value, you're compiling in wholemodule
mode, and the files are passed to the compiler in the above order (with SomeOtherFile.swift
in the middle of the two), then it seems that the compiler fails to properly infer @objc
-ness for the implementation of func tableView(_:, didSelectRowAt:)
. You can work around it by explicitly tagging it with @objc
for now.
collectionView didSelectItemAtIndexPath stopped working after migrated to Xcode 10.2
The delegate method was probably renamed. Check that you're implementing:
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath)
Also double-check that you're still setting the controller as a delegate for the UICollectionView.
scrollViewDidScroll not getting called (I set the delegate!)
I was missing an !
private func scrollViewDidScroll(_ scrollView: UIScrollView!) {
print("delegate")
}
Solved the issue.
Where does DLLImport look for unmanaged DLLs?
I think it is working like LoadLibrary.
Maybe Windows path searching in LoadLibrary with manifest will be helpfull.
Edit Dynamic-Link Library Search Order is probably what you want.
self.tableView.delegate = self Swift
do I still need to add self.tableView.delegate = self to the actual view controller?
No. You are doing this by making the connection in the storyboard. They are exactly the same thing: an assignment to the delegate
property, expressed in two different ways (one in code, one "graphically" in Interface Builder). You only need to do one of them.
But if your view controller were a table view controller (UITableViewController subclass), then you would do neither, because the table view controller is already the table view's data source and delegate. The same is true for a collection view controller (UICollectionViewController subclass); it is already the collection view's data source and delegate.
react-native-maps iOS build issues when using use_frameworks! :linkage = :static
To be able to build the project with react-native-maps
and use_frameworks
as described in the question I had to fork the react-native-maps
library and replace
Google-Maps-iOS-Utils
with Google_Maps_iOS_Utils
in header imports in
lib/ios/AirGoogleMaps/AIRGoogleMap.m
:
#import <Google_Maps_iOS_Utils/GMUKMLParser.h>
#import <Google_Maps_iOS_Utils/GMUPlacemark.h>
#import <Google_Maps_iOS_Utils/GMUPoint.h>
#import <Google_Maps_iOS_Utils/GMUGeometryRenderer.h>
and in lib/ios/AirGoogleMaps/AIRGoogleMapHeatmap.h
:
#import <Google_Maps_iOS_Utils/GMUHeatmapTileLayer.h>
If anybody knows a better solution than this, I will be happy to accept it and if the answer is added in next few days I will grant it the bounty attached to the question.
I will probably keep the fork until react-native-maps
is updated to have a newer version of google-maps-ios-utils
(in v3 i think the issue is fixed).
"react-native-maps": "https://github.com/fdobre/react-native-maps#hot-fix-use-frameworks-ios",
Getting error No such module using Xcode, but the framework is there
I'm not sure why this happens, but one way to solve your issue is to go into your build settings and defining the Framework Search Paths to a folder which contains the frameworks in question. If the frameworks are placed in your project directory, simply set the framework search path to $(SRCROOT)
and set it to recursive.
Related Topics
Send Messages Between iOS and Watchos with Watchconnectivity in Watchos2
What Is Kcferrordomaincfnetwork Code=303
Objective-C 101 (Retain VS Assign) Nsstring
Xcode 11 Backward Compatibility: "Uiwindowscene Is Only Available in iOS 13 or Newer"
This Certificate Has an Invalid Issuer:Keychain Marks All Certificates as "Invalid Issuer"
iOS Game Center: Scores Not Showing on Leaderboard in Sandbox
How to Use Keychain for Saving Password Like Generickeychain Sample Code
Xcode 7.3.1 with iOS 10 Support
Mutating Self (Struct/Enum) Inside Escaping Closure in Swift 3.0
How to Present a Uiviewcontroller from Skscene
Add "Edit in Excel" or "Edit Photo" Extension
Changing Placeholder Text Color with Swift
How to Display a Uipopoverview as a Annotation to the Map View? (iPad)
Auto-Layout: What Creates Constraints Named Uiview-Encapsulated-Layout-Width & Height