- 博客(300)
- 资源 (4)
- 收藏
- 关注
原创 pm2 开机自启动
step1: pm2 start npm --name “projectName” – run startstep2: pm2 saveIt will show as follow:[PM2] Saving current process list…[PM2] Successfully saved in /root/.pm2/dump.pm2step3: pm2 startup
2022-08-18 22:05:10
425
原创 deviceToken value always is "32bytes"
在func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) 获取到deviceToken,值未nil,deviceToken发现值为”32bytes”解决方法:let deviceTokenString = deviceToken
2017-01-03 11:02:45
1023
原创 download php file instead of executing user group
solution: change user and group of file or folderfor example: chown -R userName:groupName folderNamechown -R root:root folderName
2016-12-30 07:34:19
652
原创 Property with 'retain (or strong)' attribute must be of object type
RongIMKit.framework/Headers/RCMessageModel.h:94:30: Unknown type name ‘RCReadReceiptInfo’ (2)RongIMKit.framework/Headers/RCMessageModel.h:94:1: Property with ‘retain (or strong)’ attribute must be of o
2016-12-29 23:47:00
1242
原创 duplicate symbols for architecture x86_64 and No such file or directory
two errors: 1: duplicate symbols for architecture x86_64 2:error: cannot parse the debug map for “/Users/— Library/Developer/Xcode/DerivedData/ProjectName- dejxrzrmfgomxxcrzloplmsozads/Build/Pro
2016-12-29 12:11:10
656
原创 Ambiguous reference to member 'dataTask(with:completionHandler:)'
Ambiguous reference to member ‘dataTask(with:completionHandler:)’let request = NSMutableURLRequest(url: URL(string: “Your API URL here” ,param: param))!, cachePolicy: .useProtocolCachePolicy,
2016-12-29 09:45:24
1951
原创 Expression was too complex to be solved in reasonable time; consider breaking up the expression into
Xcode 7 works fine if calculate the value of -60*60*24*2-60*60 but there is an error on Xcode 8 which says Expression was too complex to be solved in reasonable time; consider breaking up the expressi
2016-12-29 09:12:42
1690
原创 swift 3, swift2
Swift3:DispatchQueue.main.async(execute: { })Swift2: dispatch_async(dispatch_get_main_queue(), { })TimeInterval–swift3 NSTimeInterval–swift2fileprivate-swift3 private-swift2D
2016-12-21 12:18:58
1160
转载 Convert to Current Swift Syntax Failed: Could not find test host
Method: Select the Xcode project in the lefthand browser. Click on your test target in the Project’s General tab. Disclose “YorrPorojectNameTesting”. In my project the “Host Application” pulldown bu
2016-12-21 11:35:13
1481
原创 xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is
method: select Xcode version in Command Line Tools in Location(Click Xcode and then Preferences)Before: After:
2016-12-20 06:57:52
4502
转载 how to change Scheme name
Choose “Edit Scheme” from the “Product” menu. Click on the “Manage Schemes…” button Select the scheme whose name you wish to change Press the “Return” key It will select the name of the scheme and
2016-12-20 05:51:19
523
原创 Unable to create directory wp-content/uploads/2016/12. Is its parent directory writable by the serve
method: first : chmod 777 wp-content/uploads/ and then: chmod 755 wp-content/uploads/ to make you can upload
2016-12-14 11:43:44
3639
原创 iBeacon develop
Beacon Vendor Default UUID Open Beacon AA6062F0-98CA-4211-8EC4-193EB73CEBE6 Estimote B9407F30-F5F8-466E-AFF9-25556B57FE6D Radius Networks 2F234454-CF6D-4A0F-ADF2-F4911BA9FFA6 Beacon Inside F
2016-12-12 02:24:37
756
原创 can not find difinition of a class
the library already add in Xocde, you need import the library in the sourecode. but if by setting Xocde , you may not need to import the library
2016-12-06 01:31:52
447
原创 AFNetworking required by Podfile AFNetworking (= 2.6.0) required by Podfile.lock
AFNetworking required by Podfile AFNetworking (= 2.6.0) required by Podfile.locksolution: remove or rename Podfile.lock and run pod install again if AFNetworking (= 2.6.0) required by other library,
2016-12-05 23:53:13
1197
原创 image not found
the app canrun with Xcode. but if just click the app in simulator, it can not run and no error clue. If run in real device, xcode will give the following message: dyld: Library not loaded: @rpath/Vime
2016-12-05 12:09:39
919
原创 method to solve the problem : Could not cast value of type 'NSManagedObject_ to
Set module!!!
2016-11-30 12:41:17
686
原创 tableview cells after several cells can not selected
Description: first top several table cells can be selected, but after tableview cells after several cells can not selectedReason: table view height is too smallSolution: set table view height bigge
2016-11-30 00:25:49
397
转载 Why is NSNotification its observer called multiple times
a likely cause is that your viewcontrollers are over-retained and not released when you think they are. This is quite common even with ARC if things are over-retained. So, you think that you have only
2016-11-26 07:49:10
584
转载 how to quit webview player
UIMoviePlayerControllerDidExitFullscreenNotification NSNotification not working in iOS 8UIWebView上播放视频,获取全屏播放事件/退出全屏播放 之前的办法: [[NSNotificationCenter defaultCenter]addObserver:selfselector:@selector(
2016-11-26 04:39:58
561
原创 can not remove app on iphone simulator?
method to fix it: Click the simulator to active it, then select hardware in simulator tools followed by clicking “Touch pressure”. In the “Touch pressure” option, click “Shallow press” to make it not
2016-11-18 23:11:10
381
原创 cellForRowAtIndexPath not called but numberOfRowsInSection called
one reason: if tableview exist in a UIView, NOT uicontroller, and this uiview is hidden will cause this problem
2016-11-06 01:55:33
731
原创 a case of table cell cover other cell
the reason is heightForRowAtIndexPath is smaller to the hight of custom table cell
2016-11-05 22:57:02
310
原创 one method to resolve table cell can not be selected
func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat { return (CGFloat(106)) // MUST Return CGFloat type value //Xcode 8 even not g
2016-11-03 04:23:04
448
原创 how to remove 1px line at UINavigationBar
let navBar:UINavigationBar=UINavigationBar()navBar.frame=CGRectMake(0, 0, view.frame.width, 80)navBar.shadowImage = UIColor.whiteColor().as1ptImage()navBar.setBackgroundImage(UIColor.whiteColor().as
2016-11-01 05:41:20
587
原创 how to set custom navigator title
Method is that navigationItem.titleView uses UIView, and this UIView add custom title. example: var containerView = UIView() containerView.frame = CGRectMake(30, 30, 400, 50) var titlevi
2016-10-28 02:10:09
293
原创 how to dismiss UIAlertController once clicking outside itself?
func tapColor(sender: UIGestureRecognizer) { let paraList = [ "Grey","Black","Brown" ] func actionSheetHandlerParameters(para : String) { ColorLabel.text = para Colo
2016-10-27 02:20:52
573
转载 self.navigationItem.titleView不居中
为什么self.navigationItem.titleView有时候不能居中呢答一:UINavigationBar automatically centers its titleView as long as there is enough room. If the title isn’t centered that means that the title view is too wide to
2016-10-21 06:12:58
692
原创 how to pase JSON in Swift
http://roadfiresoftware.com/2015/10/how-to-parse-json-with-swift-2/Example: { “blogs”: [ { “needspassword”: true, “id”: 73, “url”: “http://remote.b
2016-10-19 03:55:56
508
原创 FCM issues (Firebase Cloud Message)
Check this video, youtube.com/watch?v=VpbNFIY1qJ0 time 13:45. They said that if you set Info.plist FirebaseAppDelegateProxyEnabled to NO you should call “setAPNSToken” and “appDidReceiveMessage (http:
2016-10-19 03:45:20
1445
原创 iOS issues
1: for devices running iOS 10 and above, you must assign your delegate object to the UNUserNotificationCenter object to receive display notifications, and the FIRMessaging object to receive data messag
2016-10-19 03:08:21
635
原创 Unable to connect with FCM. Optional(Error Domain=com.google.fcm Code=501
Solution: open push notification and in backgroud mode open remote notification in Xcode 8iOS 9.3// [START connect_to_fcm] func connectToFcm() { //FIRMessaging.messaging().connect { (erro
2016-10-19 02:38:31
1446
原创 NSObject in swift2 can present AnyHashable in swift3
AnyHashable is new structure in Swift 3
2016-10-19 02:16:47
757
原创 no valid 'aps-environment' entitlement string found for application xcode 8
Solution: Need open Push notification at Capabilities tab in XcodeOnce open push notification, You will see steps : Add push notifications entitlement to your entitlement file
2016-10-16 06:35:12
1134
转载 swift jump page ways
1 var sb = UIStoryboard(name: “Main”, bundle:nil) var vc = sb.instantiateViewControllerWithIdentifier(“ChooseViewController”) as ChooseViewController self.presentViewController(vc, animated:true, c
2016-10-14 02:43:28
352
原创 how to search special string in direction
grep -rn -w “The StringYou want to search” *means search all files in current direction -w mean search the whole string, not string which includes the search string
2016-10-13 23:05:08
300
原创 split string with character in swift
let splitChar : String = ” ” let lanArray : [String] = lans.componentsSeparatedByString(splitChar)
2016-10-12 04:26:16
312
原创 Instance member cannot be used on type
reason: The error is because the type tries to access the self property before self was initialized (initialization happens after defining the values for properties). Solution: define first before in
2016-10-08 11:19:27
7659
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人